#ifndef SERVER_H
#define SERVER_H
char *MyReadLineFromTxt(FILE *pf,int *linelen);
int Register (int datafd,struct sqlite3 *pdb,struct DictOLPDU * reqpdu);
int login (int datafd,struct sqlite3 *pdb,struct DictOLPDU * reqpdu);
int HandleQueryWord (int datafd,struct sqlite3 *reqpdb,struct DictOLPDU * reqpdu,char *username);
int HandleQueryHistory (int datafd,struct sqlite3 *rsppdb,struct DictOLPDU * reqpdu,char*username);
struct DictOLPDU * QueryWordFromFile(char *word);
int server_main_loop(int servfd);
int create_server_socket(const char *ip,unsigned short port,int listennum);
void * handle_client(void *arg);
#endif
